package com.shujia.day05;

public class Animal {

    public Animal() {
        System.out.println("这是Animal类的构造方法");
    }

    public Animal(int age) {
        this.age = age;
        System.out.println("这是Animal类的有参构造方法");
    }

    private int age  = 1; // 将 age 成员变量变成私有的

    int weight = 10;

    private void run(){
        System.out.println("动物都可以走动...");
    }

    public void eat(){
        System.out.println("可以进食...");
    }
}
